<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
{##}
<form action="" method="post">
    {#在form表单中使用下发的csrf_token#}
    {#csef防护原理，每次进行get以外的请求都会上传校验csrf_token#}
    <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
    账号： <input type="text" name="username"><br>
    密码： <input type="password" name="password"><br>
    <input type="submit" value="注册">
</form>

{#前端校验的实现代码#}
<hr>

{{ registerform }}
<form action="" method="post">
{% for one in registerform %}
    <p>
    {{ one.label }}:{{ one }}
    </p>
{% endfor %}
    <input type="submit" value="提交">
</form>


</body>
</html>